import request from '@/utils/request.js'

const prefix = 'api'

// 获取token
export const postForgeOauth = () => {
	return request({
		url: prefix + '/authentication/v2/token',
		method: 'post',
		headers: { 
            'content-type': 'application/x-www-form-urlencoded',
            'Authorization': 'Basic ZWZORTJCOGVoNDd3RVZ3RVF4d1NucWg1SG1MMkk0aXVpSU9ZV1VnRkQwVGFBZlZzOk5naHV2UURpVHhZRFU5VFZhM1lPUFdTaGtaREE5Y0FBckZJMTZOa0REQTZRYmZwS2dHYmEwTXNOeVMzSVp0WUo=',
            'Accept': 'application/json'
        },
		data: {
            grant_type: 'client_credentials',
            scope: 'data:read data:write data:create bucket:create bucket:read'
        }
	})
}